home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / stp.vim < prev    next >
Encoding:
Text File  |  2001-06-28  |  4.8 KB  |  121 lines

  1. " Vim syntax file
  2. "    Language: Stored Procedures (STP)
  3. "  Maintainer: Jeff Lanzarotta (frizbeefanatic@yahoo.com)
  4. "         URL: http://lanzarotta.tripod.com/vim/syntax/stp.vim.zip
  5. " Last Change: June 27, 2001
  6.  
  7. " For version 5.x, clear all syntax items.
  8. " For version 6.x, quit when a syntax file was already loaded.
  9. if version < 600
  10.   syntax clear
  11. elseif exists("b:current_syntax")
  12.   finish
  13. endif
  14.  
  15. syn case ignore
  16.  
  17. " The STP reserved words, defined as keywords.
  18.  
  19. syn keyword stpSpecial    null
  20.  
  21. syn keyword stpKeyword    begin break call case create deallocate dynamic else
  22. syn keyword stpKeyword    elseif end execute for from function go grant if
  23. syn keyword stpKeyword    index insert into leave max min on output procedure
  24. syn keyword stpKeyword    public result return returns scroll table then to
  25. syn keyword stpKeyword    when while
  26.  
  27. syn keyword stpOperator   asc not and or desc group having in is any some all
  28. syn keyword stpOperator   between exists like escape with union intersect minus
  29. syn keyword stpOperator   out prior distinct sysdate
  30.  
  31. syn keyword stpStatement  alter analyze as audit avg by close clustered comment
  32. syn keyword stpStatement  commit continue count create cursor declare delete
  33. syn keyword stpStatement  drop exec execute explain fetch from index insert
  34. syn keyword stpStatement  into lock loop max min next noaudit nonclustered open
  35. syn keyword stpStatement  order output print raiserror recompile rename revoke
  36. syn keyword stpStatement  rollback savepoint select set sum transaction
  37. syn keyword stpStatement  truncate unique update values where
  38.  
  39. syn keyword stpFunction   abs acos ascii asin atan atn2 avg ceiling charindex
  40. syn keyword stpFunction   charlength convert col_name col_length cos cot count
  41. syn keyword stpFunction   curunreservedpgs datapgs datalength dateadd datediff
  42. syn keyword stpFunction   datename datepart db_id db_name degree difference
  43. syn keyword stpFunction   exp floor getdate hextoint host_id host_name index_col
  44. syn keyword stpFunction   inttohex isnull lct_admin log log10 lower ltrim max
  45. syn keyword stpFunction   min now object_id object_name patindex pi pos power
  46. syn keyword stpFunction   proc_role radians rand replace replicate reserved_pgs
  47. syn keyword stpFunction   reverse right rtrim rowcnt round show_role sign sin
  48. syn keyword stpFunction   soundex space sqrt str stuff substr substring sum
  49. syn keyword stpFunction   suser_id suser_name tan tsequal upper used_pgs user
  50. syn keyword stpFunction   user_id user_name valid_name valid_user
  51.  
  52. syn keyword stpType       binary bit char datetime decimal double float image
  53. syn keyword stpType       int integer long money nchar numeric precision real
  54. syn keyword stpType       smalldatetime smallint smallmoney text time tinyint
  55. syn keyword stpType       timestamp varbinary varchar
  56.  
  57. syn keyword stpGlobals    @@char_convert @@cient_csname @@client_csid
  58. syn keyword stpGlobals    @@connections @@cpu_busy @@error @@identity
  59. syn keyword stpGlobals    @@idle @@io_busy @@isolation @@langid @@language
  60. syn keyword stpGlobals    @@maxcharlen @@max_connections @@ncharsize
  61. syn keyword stpGlobals    @@nestlevel @@packet_errors @@pack_received
  62. syn keyword stpGlobals    @@pack_sent @@procid @@rowcount @@servername
  63. syn keyword stpGlobals    @@spid @@sqlstatus @@testts @@textcolid @@textdbid
  64. syn keyword stpGlobals    @@textobjid @@textptr @@textsize @@thresh_hysteresis
  65. syn keyword stpGlobals    @@timeticks @@total_error @@total_read @@total_write
  66. syn keyword stpGlobals    @@tranchained @@trancount @@transtate @@version
  67.  
  68. syn keyword stpTodo       TODO FIXME XXX DEBUG NOTE
  69.  
  70. " Strings and characters:
  71. syn match   stpStringError  "'.*$"
  72. syn match   stpString          "'\([^']\|''\)*'"
  73.  
  74. " Numbers:
  75. syn match   stpNumber          "-\=\<\d*\.\=[0-9_]\>"
  76.  
  77. " Comments:
  78. syn region  stpComment    start="/\*"  end="\*/" contains=stpTodo
  79. syn match   stpComment    "--.*" contains=stpTodo
  80.  
  81. " Parens:
  82. syn region  stpParen      transparent start='(' end=')' contains=ALLBUT,stpParenError
  83. syn match   stpParenError ")"
  84.  
  85. " Syntax Synchronizing
  86. syn sync    minlines=10    maxlines=100
  87.  
  88. " Define the default highlighting.
  89. " For version 5.x and earlier, only when not done already.
  90. " For version 5.8 and later, only when and item doesn't have highlighting yet.
  91. if version >= 508 || !exists("did_stp_syn_inits")
  92.   if version < 508
  93.     let did_stp_syn_inits = 1
  94.     command -nargs=+ HiLink hi link <args>
  95.   else
  96.     command -nargs=+ HiLink hi def link <args>
  97.   endif
  98.  
  99.   HiLink stpComment Comment
  100.   HiLink stpKeyword Keyword
  101.   HiLink stpNumber    Number
  102.   HiLink stpOperator    Operator
  103.   HiLink stpSpecial Special
  104.   HiLink stpStatement    Statement
  105.   HiLink stpString    String
  106.   HiLink stpStringError Error
  107.   HiLink stpType Type
  108.   HiLink stpTodo Todo
  109.   HiLink stpFunction    Function
  110.   HiLink stpGlobals Macro
  111.   HiLink stpParen Normal
  112.   HiLink stpParenError Error
  113.   HiLink stpSQLKeyword Function
  114.  
  115.   delcommand HiLink
  116. endif
  117.  
  118. let b:current_syntax = "stp"
  119.  
  120. " vim ts=8 sw=2
  121.